import request from "@/request/request";

// 联合体列表
export function eduList(params) {
  return request({
    url: "/dev-api/alliance/alliance/list",
    method: "get",
    params,
  });
}

// 联合体新增
export function eduAdd(data) {
  return request({
    url: "/dev-api/alliance/memberIndividual",
    method: "post",
    data,
  });
}

// 申请联合体列表
export function eduApplyList(params) {
  return request({
    url: "/dev-api/alliance/memberIndividual/list",
    method: "get",
    params,
  });
}

// 申请联合体列表-详情
export function eduApplyDetail(id) {
  return request({
    url: "/dev-api/alliance/memberIndividual/" + id,
    method: "get",
    id,
  });
}
// 用户申请状态-详情
export function eduApplyStatus(params) {
  return request({
    url: "/dev-api/alliance/memberIndividual/memberStatus",
    method: "get",
    params,
  });
}

// 供需列表
export function eduSupplyList(params) {
  return request({
    url: "/dev-api/alliance/supply/list",
    method: "get",
    params,
  });
}
// 供需列表-新增
export function eduSupplyAdd(data) {
  return request({
    url: "/dev-api/alliance/supply",
    method: "post",
    data,
  });
}
// 供需列表-修改
export function eduSupplyEdit(data) {
  return request({
    url: "/dev-api/alliance/supply",
    method: "post",
    data,
  });
}
// 供需列表-详情
export function eduSupplyDetail(id) {
  return request({
    url: "/dev-api/alliance/supply/" + id,
    method: "get",
  });
}
// 供需列表-删除
export function eduSupplyDelete(id) {
  return request({
    url: "/dev-api/alliance/supply/batch/" + id,
    method: "DELETE",
  });
}
// 是否为联合体成员
export function isEduMember(params) {
  return request({
    url: "/dev-api/alliance/alliance/isMember",
    method: "get",
    params,
  });
}

// 聊天新增
export function chatAdd(data) {
  return request({
    url: "/dev-api/alliance/chatRoom",
    method: "post",
    data,
  });
}
// 供需发布者查看联系人列表
export function chatUser(params) {
  return request({
    url: "/dev-api/alliance/chatRoom/linkmanContacts",
    method: "get",
    params,
  });
}
// 聊天列表
export function chatList(params) {
  return request({
    url: "/dev-api/alliance/chatRoom/list",
    method: "get",
    params,
  });
}
// 联合体列表-不登录
export function eduListNo(params) {
  return request({
    url: "/dev-api/alliance/alliance/allianceList",
    method: "get",
    params,
    headers: {
      tenantId: "1743924387074326530",aaa_a:"aaa",
      soureName: "11af56432aba484486704925266b50cd",
    },
  });
}

// 供需列表-不登录
export function eduSupplyListNo(params) {
  return request({
    url: "/dev-api/alliance/supply/showList",
    method: "get",
    params,
    headers: {
      tenantId: "1743924387074326530",aaa_a:"aaa",
      soureName: "11af56432aba484486704925266b50cd",
    },
  });
}
// 供需详情-不登录
export function eduSupplyDetailNo(id) {
  return request({
    url: "/dev-api/alliance/supply/info/"+id,
    method: "get",
    headers: {
      tenantId: "1743924387074326530",aaa_a:"aaa",
      soureName: "11af56432aba484486704925266b50cd",
    },
  });
}

// 判断联系人是否重复联系-不登录
export function chatIs(params) {
  return request({
    url: "/dev-api/alliance/chatRoom/checkout",
    method: "get",
    params,
  });
}
